import { apiRequest } from '@/utils/request'
import type { IUserResponse } from '@/types/apis/user'

/**
 * 获取用户列表
 */
export function userListApi(params: any) {
  return apiRequest<IUserResponse[]>({
    method: 'get',
    url: '/mock/user',
    params,
  })
}

/**
 * 获取指定用户信息
 */
export function userByIdApi(id: string | number) {
  return apiRequest<IUserResponse>({
    method: 'get',
    url: `/mock/user/${id}`,
  })
}
